<%@page import="com.liferay.portal.theme.ThemeDisplay"%>
<%@page import="javax.portlet.ActionRequest"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.kernel.dao.search.ResultRow"%>

<%@ include file="/html/init.jsp" %>

<%       
	ResultRow row = (ResultRow) 
       	request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);		
	LMSBook lmsBook = (LMSBook) row.getObject();
	
	PortletURL bookViewURL = renderResponse.createRenderURL();
	bookViewURL.setParameter("jspPage", "/html/details.jsp");
	bookViewURL.setParameter("bookId", String.valueOf(lmsBook.getBookId()));
	bookViewURL.setParameter("backURL", themeDisplay.getURLCurrent());
	
	PortletURL deleteBookURL = renderResponse.createActionURL();
	deleteBookURL.setParameter(ActionRequest.ACTION_NAME, "deleteBook");
	deleteBookURL.setParameter("bookId", String.valueOf(lmsBook.getBookId()));
	deleteBookURL.setParameter("redirectURL", themeDisplay.getURLCurrent());
	
	PortletURL editBookURL = renderResponse.createRenderURL();
	editBookURL.setParameter("jspPage", "/html/form.jsp");
	editBookURL.setParameter("bookId", String.valueOf(lmsBook.getBookId()));
%>

<liferay-ui:icon-menu>
	<liferay-ui:icon url="<%= bookViewURL.toString() %>" image="view"/>
	<liferay-ui:icon url="<%= deleteBookURL.toString() %>" image="delete"/>
	<liferay-ui:icon url="<%= editBookURL.toString() %>" image="edit"/>
</liferay-ui:icon-menu>